-- GENERATED SPELL FOR [Portal Keeper] --


function spell0_30893(pUnit, Event) --@Arcane Volley,n/a--
pUnit:FullCastSpellOnTarget(58536,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30893', 2000, 1)
end

function spell1_30893(pUnit, Event) --@Arcane Volley,n/a--
pUnit:FullCastSpellOnTarget(61591,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30893', 2000, 1)
end

function spell2_30893(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(58535,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30893', 6500, 1)
end

function spell3_30893(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(61590,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30893', 6000, 1)
end

function spell4_30893(pUnit, Event) --@Polymorph,n/a--
pUnit:FullCastSpellOnTarget(58537,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30893', 6500, 1)
end

function Sorts_30893(pUnit, Event)
local choix_sorts_30893 = math.random(0, 4)
if choix_sorts_30893 == 0 then
pUnit:RegisterEvent('spell0_30893', 1, 1)
end
if choix_sorts_30893 == 1 then
pUnit:RegisterEvent('spell1_30893', 1, 1)
end
if choix_sorts_30893 == 2 then
pUnit:RegisterEvent('spell2_30893', 1, 1)
end
if choix_sorts_30893 == 3 then
pUnit:RegisterEvent('spell3_30893', 1, 1)
end
if choix_sorts_30893 == 4 then
pUnit:RegisterEvent('spell4_30893', 1, 1)
end
end

function mob30893_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30893', math.random(1500, 3000), 1)
end

function mob30893_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30893_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30893_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30893, 1, 'mob30893_Action')
RegisterUnitEvent(30893, 2, 'mob30893_Leave')
RegisterUnitEvent(30893, 3, 'mob30893_Kill')
RegisterUnitEvent(30893, 4, 'mob30893_Die')
